<?php
//
// xc-sections ext waiting plugin
// author: karedokx <karedokx@yahoo.com> 15-Apr-2005
//
function b_waiting_xcsection()
{
	$xoopsDB =& Database::getInstance();
	$ret = array();

	// xc-section articles - new
	$block = array();
	$result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xcs_article")." WHERE published=0");
	if ( $result ) {
		$block['adminlink'] = XOOPS_URL."/modules/xcsection/admin/allarticles.php?action=submitted";
		list($block['pendingnum']) = $xoopsDB->fetchRow($result);
		$block['lang_linkname'] = _PI_WAITING_WAITINGS;
	}
	$ret[] = $block;

	// xc-section articles - modified
	$block = array();
	$result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xcs_article_mod")."");
	if ( $result ) {
		$block['adminlink'] = XOOPS_URL."/modules/xcsection/admin/modified.php";
		list($block['pendingnum']) = $xoopsDB->fetchRow($result);
		$block['lang_linkname'] = _PI_WAITING_MODREQS;
	}
	$ret[] = $block;

	return $ret;
}
?>